package com.fxd.shopping.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fxd.core.util.PageUtils;
import com.fxd.model.product.CategoryEntity;
import com.fxd.shopping.product.dto.Catalog2DTO;

import java.util.List;
import java.util.Map;

/**
 * 商品三级分类
 *
 * @author fuxdong
 * @email 2016335176@qqcom
 * @date 2021-07-17 09:59:25
 */
public interface CategoryService extends IService<CategoryEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<CategoryEntity> listWithTree();

    void removeMenuByIds(List<Long> asList);

    /**
     * 找到catelogId的完整路径
     * [父/子/孙]
     *
     * @param catelogId
     * @return
     */
    Long[] findCatelogPath(Long catelogId);

    /**
     * 级联更新所有关联表的数据
     *
     * @param category
     */
    void updateCascade(CategoryEntity category);

    List<CategoryEntity> getLevel1Categorys();

    Map<String, List<Catalog2DTO>> getCatalogJson();
}

